#ifndef CLIENT_H_
#define CLIENT_H_

#include <vector>
using namespace std;

#include <Poco/File.h>
using Poco::File;

#include <Poco/Net/MulticastSocket.h>
using Poco::Net::MulticastSocket;

#include <Poco/Thread.h>
using Poco::Thread;

#include "master/master.h"

#include "multicastconnector/multicastconnector.h"

/**
* The client class represents a client a user can use to manage files. That is he can upload and download files using said client.
* It is not directly linked to a specific node of our ring, it autmatically connects to the correct node and downloads/uploads the correct file.
*/
class Client
{
	public:
		/**
		The default constructor. It starts up the client
		*/
		Client();

		/**
		The defailt destructor.
		*/
		~Client();

		/**
		Uploads a file to the ring
		@param file: The file that has to be uploaded
		*/
		void uploadFiles(vector<File> files);

		/**
		Downloauds a file from the ring.
		@param file The file you want to download.
		*/
		void downloadFiles(vector<File> files);

		void connect(string ringname);

		void disconnect();
	private:
		Master* _master;
};

#endif
